package com.healthcloud.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.healthcloud.dao.SportGuidanceMapper;
import com.healthcloud.entity.SportGuidance;
import com.healthcloud.service.SportGuidanceService;
import com.healthcloud.utils.PageParam;

/**
 * Created by houxianghua on 2016/5/10.
 */
@Service
@Transactional
public class SportGuidanceServiceImpl implements SportGuidanceService {

    @Autowired
    private SportGuidanceMapper sportGuidanceMapper;

    @Override
    public int save(SportGuidance sportGuidance) {
        return sportGuidanceMapper.save(sportGuidance);
    }

    @Override
    public int update(SportGuidance sportGuidance) {
        return sportGuidanceMapper.update(sportGuidance);
    }

    @Override
    public int delete(Long id) {
        return sportGuidanceMapper.delete(id);
    }

    @Override
    public List<SportGuidance> findByEntity(SportGuidance sportGuidance) {
        return sportGuidanceMapper.findByEntityAll(sportGuidance);
    }

    @Override
    public List<SportGuidance> findByLikeName(String name) {
        return sportGuidanceMapper.findByLikeName(name);
    }

    @Override
    public List<SportGuidance> search(SportGuidance sportGuidance, PageParam pageParam) {
        return sportGuidanceMapper.search(sportGuidance, pageParam);
    }
}
